import { program } from "commander";
const buildOpts = {
	opts: program.opts(),
	get: function (key) {
		if (!key) return this.opts;
		if (Array.isArray(key)) {
			return key.map((item) => {
				return this.opts[item] || '';
			});
		}
		return this.opts[key] || '';
	},
	checkKey: function (key) {
		return this.opts.hasOwnProperty(key);
	},
};

export { buildOpts };
